<template>
<div class="container">
  <h3>{{}}</h3>
  <div class="form">
    <el-form ref="form" :model="car" label-width="80px">
      <el-form-item label="居民Id">
        <el-input v-model="car.residentId"></el-input>
      </el-form-item>
      <el-form-item label="车牌号">
        <el-input v-model="car.plateNumber"></el-input>
      </el-form-item>
      <el-form-item label="时间">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择日期" v-model="car.time1" style="width: 100%"></el-date-picker>
        </el-col>
        <el-col class="line" :span="2">-</el-col>
        <el-col :span="11">
          <el-time-picker placeholder="选择时间" v-model="car.time2" style="width: 100%"></el-time-picker>
        </el-col>
        <el-form-item label="车位区域">
          <el-select v-model="car.region" placeholder="请选择停车区域">
            <el-option label="地上停车区" value="on"></el-option>
            <el-option label="地下停车区域" value="under"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="添加人" >
          <el-input v-model="car.staffId"></el-input>
        </el-form-item>
      </el-form-item>
      <el-form-item type="primary @click=onSumbit"></el-form-item>
    </el-form>
    <el-table
    :data="$data"
    style="width: 100%">
      <el-table-column prop="residentId"
      label="居民ID" width="180">
    </el-table-column>
    <el-table-column prop="plateNumber"
    label="车牌号" width="180"></el-table-column>
    <el-table-column prop="time"
    label="登记时间" width="180"></el-table-column>
      <el-table-column  prop="region"
                        label="停车区域" width="180"></el-table-column>
    <el-table-column prop="staffId"
    label="添加人" width="180"></el-table-column>
    </el-table>

  </div>
</div>
</template>

<script >
import MyEditor from "@/components/MyEditor.vue";

export default {
  components:{MyEditor},
  name:"WebCar",
  data(){
    return{
car :{
 residentId:'',
  plateNumber:'',
  time1:'',
  time2:'',
  region:'',
  staffId:'',
},
 methods:{
  onSubmit(){
    console.log('submit');
  }
 }
    }
  }
}
</script>